import http from './http'
import { AES, mode, pad, enc } from 'crypto-js'

const GEO_KEY = 'CityBuilder@2019'
function decryptGeoAes(str: string) {
  const key = enc.Utf8.parse(GEO_KEY)
  const txt = str.replace(/\s/g, '')
  const bytes = AES.decrypt(txt, key, {
    mode: mode.ECB,
    padding: pad.Pkcs7
  })
  return bytes.toString(enc.Utf8)
}
//获取上海geojson
export function getSHGeoJson() {
  return http.get('apis/sh_geo.json')
}